package com.zh.consultant.service;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.V;
import dev.langchain4j.service.spring.AiService;
import dev.langchain4j.service.spring.AiServiceWiringMode;
import reactor.core.publisher.Flux;

@AiService(wiringMode = AiServiceWiringMode.EXPLICIT,//手动装配
           chatModel = "openAiChatModel",//指定模型
        streamingChatModel = "openAiStreamingChatModel",//指定流式模型
//        chatMemory = "chatMemory",//指定会话对象
        chatMemoryProvider = "chatMemoryProvider",
        contentRetriever = "contentRetriever",//配置向量数据库检索对象
        tools = "reservationTool"
)
//@AiService//自动装配
public interface ConsultantService {
//    public String chat(String message);


//    @UserMessage("我是软件工程专业的大学生，正在学习Java{{it}}")

//    @UserMessage("我是软件工程专业的大学生，正在学习Java{{msg}}")
//    public Flux<String> chat(@V("msg") String message);

    @SystemMessage(fromResource = "system.txt")
    public Flux<String> chat(@MemoryId String memoryId, @UserMessage String message);

}
